package org.springcloud.wisdom.spring_02_classroom.login.controller;


import org.springcloud.wisdom.spring_02_classroom.bean.ResponseData2;
import org.springcloud.wisdom.spring_02_classroom.login.entity.LoginRequest;
import org.springcloud.wisdom.spring_02_classroom.login.service.Cloginservice;
import org.springcloud.wisdom.spring_02_classroom.login.service.Cloginservice2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@CrossOrigin
@RequestMapping("/all2")
public class LoginController2 extends BaseController{
    @Autowired
    private Cloginservice cloginservice;
    @Autowired
    private Cloginservice2 cloginservice2;

    @PostMapping("/login2")
    public ResponseData2<Object> login(@RequestBody LoginRequest loginRequest) {
        System.out.println("i am  coming here");
        return returnObject(cloginservice2.login(loginRequest));
    }
}
